<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>合生元</title>
    <script src="${ctxStatic}/scripts/draw/viewport.js?v=${fns:getConfig('drawVersion')}"></script>
    <script src="http://cdnjs.gtimg.com/cdnjs/libs/wxmoment/0.0.2/wxmoment.min.js"></script>
    <link rel="stylesheet" href="${ctxStatic}/css/draw/hsy.min.css?v=${fns:getConfig('drawVersion')}&timestamp=11111111">
    <style>
        .wrap {
            min-height: 960px;
        }
        #formSpan{
				position: relative;
				top: -77px;
				left: 172px;     
				color: rgba(249, 129, 6, 0.53);
				z-index:-1
        }
    </style>    
</head>
<body>
    <div class="wrap">
    <!--logo-->
    <div class="logo"></div>
    <!--banner-->
    <div class="banner"></div>
    <!--标题图片-->
    <div class="title"></div>
    <!--中奖名称-->
    <div class="drwa-name">

    </div>
    <!--表单-->  
        <form action="${ctxFront}/updateWinner" method="post" id="form" class="form" >
            <div class="form-guolp">
            	<input type="hidden" id="winnerid"  name="winnerid" value="${winnerid }"/>
            	<input type="hidden" id="openid"  name="openid" value="${openid }"/>
            	<input type="hidden" id="sign"  name="sign" value="${sign }"/>
            	<input type="hidden" id="fromSystem"  name="fromSystem" value="${fromSystem}"/>
                <section>
                    <span>姓&nbsp;&nbsp;&nbsp;名：</span>
                    <input type="text" name="receiver" id="username" placeholder="请输入会员姓名">
                </section>
                
            <section>
                    <span>手机号：</span>                
                    <input type="text" name="recMobile" id="phone" placeholder="请输入手机号码">
         	 </section>   
         	 
			 <section>
	  			<span>地&nbsp;&nbsp;&nbsp;址：</span>
	             <input type="text" name="recAddr" id="address" placeholder="请输入收货地址">
            </section>      
                       
                <input type="submit" id="btn-submit" name="确定"  value="确定"  onclick="return sub()">
            </div>
        </form>
    <footer id="footer"></footer>
    </div>
    <script src="${ctxStatic}/scripts/draw/jquery-1.11.2.min.js"></script>
    <script>
		function onBridgeReady(){
			WeixinJSBridge.call('hideOptionMenu');
		}
		
		if (typeof WeixinJSBridge == "undefined"){
		if( document.addEventListener ){
				document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
			}else if (document.attachEvent){
				document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
				document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
			}
		}else{
			onBridgeReady();
		}    
    
        //表单验证
        function sub() {
            var username = $('#username');//用户姓名
            var phone = $('#phone');//手机号码
            var address = $('#address');//地址
            var re = /^1\d{10}$/;//验证手机格式正则表达式
            if (username.val().trim() == "" || username.val().trim() == null) {
                alert("姓名不能为空！");
                username.focus();
                return false;
            } else if (phone.val().trim() == "" || phone.val().trim() == null) {
                alert("手机号码不能为空！");
                phone.focus();
                return false
            } else if (address.val().trim() == "" || address.val().trim() == null) {
                alert("地址不能为空！");
                address.focus();
                return false;
            }
            if (re.test(phone.val().trim())) {
                return true;
            } else {
                alert("手机号码格式不对！");
                phone.focus();
                return false;
            }
        }
        $(function () {
            //表单获得焦点滚动条跟着联动
            $('#username,#phone,#address').focus(function(){
                var scro= $(this).offset().top;
                $('html,body').animate({scrollTop:scro},400);
            });
        });     
    </script>
   
</body>
<!--  <script type="text/javascript"> 
		new WxMoment.OrientationTip();
</script> -->
</html>